Sequence grabber components can work with channel components and panel components to collect configuration settings from the user. The functions discussed in this section allow you to direct the sequence grabber to display its settings dialog box to the user and to work with the configuration of each of the grabber's channels. See "About Sequence Grabber Components" for more information about the relationship between the sequence grabber and panel components.
Use the SGSettingsDialog function to instruct the sequence grabber to display its settings dialog box to the user.
The SGSetSettings and SGGetSettings functions allow you to retrieve or set the sequence grabber's configuration.
The SGSetChannelSettings and SGGetChannelSettings functions work with the configuration of an individual channel.
You may cause the sequence grabber to display its settings dialog box to the user by calling the SGSettingsDialog function. The user can use this dialog box to specify the configuration of a sequence grabber channel.
pascal ComponentResult SGSettingsDialog (SeqGrabComponent s,
SGChannel c, short numPanels,
ConstComponentListPtr panelList, long flags,
SGModalFilterUPP proc, long procRefNum);
Because the settings dialog box is a movable modal dialog box, you must provide an event filter function.
The SGSettingsDialog function instructs the sequence grabber to display its settings dialog box to the user. The sequence grabber works with one or more panel components to configure a specified channel component.
If the user clicks OK and the settings are acceptable to the panel and channel components, this function returns a result code of noErr . Because the user may change several channel configuration parameters, your application should retrieve new configuration information from the channel so that you can update any values you save, such as the channel's display boundaries or the channel device. In particular, the video rectangle for the channels may be adjusted.
You may retrieve or set the configuration of one or more channel components by using the SGGetSettings (described in the next section), SGSetSettings (described on SGSetSettings ), SGGetChannelSettings (described on SGGetChannelSettings ), or SGSetChannelSettings function (described on SGSetChannelSettings ).
The SGGetSettings function retrieves the current settings of all channels used by the sequence grabber. The sequence grabber places all of this configuration information into a Movie Toolbox user data list.
pascal ComponentResult SGGetSettings (SeqGrabComponent s,
UserData *ud, long flags);
The SGGetSettings function allows you to retrieve the sequence grabber's configuration information. The sequence grabber, in turn, retrieves configuration information for each of its channels and stores that information in a Movie Toolbox user data list. You may subsequently use the SGSetSettings function (described in the next section) to reconfigure the sequence grabber. You can store the settings (for example, in a Preferences file) by using the Movie Toolbox's PutUserDataIntoHandle function.
You may retrieve the configuration of one channel component by using the SGGetChannelSettings function (described on SGGetChannelSettings ).
The SGSetSettings function allows you to configure a sequence grabber and its channels.
pascal ComponentResult SGSetSettings (SeqGrabComponent s,
UserData ud, long flags);
The SGSetSettings function allows you to configure a sequence grabber. You provide this configuration information in a Movie Toolbox user data list. Typically, you obtain this configuration data from the SGGetSettings function, which is discussed in the previous section.
Note that the sequence grabber disposes of any of its current channels before applying this configuration information. It then opens connections to new channels as appropriate.
You can restore saved settings by using the Movie Toolbox's NewUserDataFromHandle function.
You may set the configuration of one channel component by using the SGSetChannelSettings function (described on SGSetChannelSettings ).
You may use the SGGetIndChannel function (described on SGGetIndChannel ) to obtain information about each channel that the sequence grabber is using as a result of applying this new configuration.
The SGGetChannelSettings function retrieves the current settings of one channel used by the sequence grabber. The sequence grabber places this configuration information into a Movie Toolbox user data list.
pascal ComponentResult SGGetChannelSettings (SeqGrabComponent s,
SGChannel c,
UserData *ud,
long flags);
The SGGetChannelSettings function allows you to retrieve the configuration information for a single channel component. The channel component stores that information in a Movie Toolbox user data list. You may subsequently use the SGSetChannelSettings function to reconfigure the channel (this function is described next).
You may retrieve the configuration of the entire sequence grabber, including all of its channels, by using the SGGetSettings function, described on SGGetSettings .
The SGSetChannelSettings function allows you to configure a sequence grabber channel.
pascal ComponentResult SGSetChannelSettings (SeqGrabComponent s,
SGChannel c,
UserData ud,
long flags);
The SGSetChannelSettings function allows you to configure a sequence grabber channel. You provide this configuration information in a Movie Toolbox user data list. Typically, you obtain this configuration data from the SGGetChannelSettings function, which is discussed in the previous section.
You may set the configuration of all of the sequence grabber's channels by using the SGSetSettings function. This function is described on SGSetSettings .